<div class="logoReg">
	<img src="images/txtBlack.png">
</div>

{if $return neq '1'}
	<div class="errorLogin" style="color:black;">
		Para continuar con tu pedido...
	</div>
{/if}

<div style="color:green;font-size:1.2em" class="success">
	{$success}
</div>

{if $reg eq "0"}
	<div id="login" style="{$hide_login}">
		<div align="center">
			
			<div class="registro"> 	
				
				<div class="errorLogin">				
					<fb:login-button registration-url="http://www.delivery351.com/index.php?act=registroFacebook" on-login="recargar();" />
					Entrar con Facebook
				</div>			
			 
			 	
			 	<form action="?act=reg" method="POST" class="form-4" id="regForm">
			 		{if $return neq '1'}
			 			<input type="hidden" name="return" value="{$return}" />
			 		{/if}
			 		
			 		<p>
        				<input type="text" name="email" placeholder="Email" required />
    				</p>
    				
    				<p>
        				<label for="password">Password</label>
        				<input type="password" name='password' placeholder="Password" required /> 
    				</p>
 
    				<p>
       				<input type="submit" name="action" value="{$lang.login}"  style="background: red;color:white"/>
    				</p>       
				</form>	
					
			</div>
			
			{if $return neq '1'}
				<div class="pieReg">
					Si aún no tenés cuenta
					<a href="?act=reg&reg=1&return={$return}">
						click aquí
					</a>
				</div>
			{/if}			
			
		</div>
	</div>
	
	
	
	
	<div id="reg" style="{$hide_register}">
		<div align="center">
		   
			<div class="registro">      
			             
				<div class="errorLogin">				
					<fb:login-button registration-url="http://www.delivery351.com/index.php?act=registroFacebook" on-login="recargar();" />
					Entrar con Facebook
				</div>	
				
				<form action="?act=reg" method="post" class="form-4" id="regForm">
					{if $return neq '1'}
			 			<input type="hidden" name="return" value="{$return}" />
			 		{/if}
   
    				<p> 
					    
        				<label for="login">Nombre</label>
						
        				<input type="text" name="name" placeholder="Nombre" required>
    				</p>
					
					<p>
	        			<label for="login">Apellido</label>
        				<input type="text" name="last_name" placeholder="Apellido" required>
    				</p>
	
					<p>
		        		<label for="login">E-mail</label>
        				<input type="text" name="email" placeholder="E-mail" required>
    				</p>

					<p>
	        			<label for="login">Direccion</label>
        				<input type="text" name="address" placeholder="Dirección   Completa" required>
    				</p>
				
					<p>
	        			<label for="login">Teléfono</label>
        				<input type="text" name="phone" placeholder="Teléfono" required>
    				</p>
    			
    				<p>
	        			<label for="password">Password</label>
        				<input type="password" name='password' placeholder="Password" required> 
    				</p>
 
    				<p>
	    				<input type="submit" name="action" value="{$lang.reg_register_button}" style="background: red;color:white"/>
    				</p>       
    			</form>
    		</div>			
		</div>
	</div>
	
	
{else}

	<form action="?act=reg" method="post">
		<div class="tablaInfoUser">
  			<input type="hidden" name="userid" value="{$profile.id}">
  				<h2>
	    			{$lang.reg_profile_label} | {$profile.name}, {$profile.last_name}
  				</h2>
  				
  				<table border="0" cellspacing="0" cellpadding="0">
    				<tr>
      				<td>
      					{$lang.contact_firstname}
      				</td>
      			
      				<td>
      					<input type="text" name="name" value="{$profile.name}" />
      				</td>
    				</tr>
     				
     				<tr>
      				<td>
	      				{$lang.contact_lastname}
      				</td>
      			
      				<td>
      					<input type="text" name="last_name" value="{$profile.last_name}" />
      				</td>
    				</tr>
	    				
    				<tr>
      				<td>
      					{$lang.contact_email}
      				</td>
      			
      				<td>
	      				<input type="text" name="email"  value="{$profile.email}" class="required email" />
      				</td>
    				</tr>
      			
      			<tr>
      				<td>
	      				{$lang.contact_streetaddress}
      				</td>
      			
      				<td>
	      				<input type="text" name="address"  value="{$profile.address}" />
      				</td>
    				</tr>
   				
   				<tr>
     					<td>
     						{$lang.contact_city}
     					</td>
     				
     					<td>
	     					<input type="text" name="city" value="{$profile.city}" disabled="true" />
     					</td>
   				</tr>
   			
   				<tr>
	     				<td>
     						{$lang.contact_dayphone}
     					</td>
     				
     					<td>
	     					<input type="text" name="phone"   value="{$profile.phone}"/>
   	  				</td>
   				</tr>
	   			
   				<tr>
	   				<td colspan="2" align="center">
   						<b>Cambiar contraseña</b>
   					</td>
   				</tr>

   				<tr>
	     				<td>
     						{$lang.reg_current_password_label}
     					</td>
     				
     					<td>
	     					<input type="password" name="current_password"  value="" />
   	  				</td>
   				</tr>
   			
   				<tr>
	     				<td>
     						{$lang.reg_new_password_label}
     					</td>
     				
     					<td>
     						<input type="password" name="password"  value="" />
     					</td>
   				</tr>
   			
   				<tr>
	     				<td>
     						{$lang.reg_confirm_password_label}
     					</td>
     				
     					<td>
	     					<input type="password" name="password_confirm"  value="" />
     					</td>
   				</tr>
	
   				<tr>
	     				<td colspan="2" align="center">
     						<input type="submit" name="action" value="{$lang.reg_save_button}"/>
     					</td>
   				</tr>	
   			</table>
   		</div>
	</form>
{/if}
